There isn't any rule about how many infinitives you can have in a row; you can have as many as make sense in the context. A rather contrived example: Mi volas povi iri lerni danci - I want to be able to go learn to dance. The basic principle is that an infinitive, like any verb, can take a complement, which may be another infinitive, which in turn can take a complement, and so on. So theoretically such a chain could be infinite, but that is rarely practical!
In your sentence, you'd use "por" before "povi", because the sense is "in order to" (while in my sentence you could say the going is in order to learn, it is common practice to use the infinitive directly after "iri", without "por"). This is also because "scii" before an infinitive is usually understood as "to know how", thus your sentence would translate to "What one must know how to be able to grow potatoes" which is confusing at best.