Potassium (#"K"#) is located in group 1, period 4 of the periodic table and has an atomic number of 19.
Since you're dealing with a neutral atom, the number of electrons #"K"# has must equal 19. You could determine how many p-orbitals are occupied in a #"K"# atom by writing its electron configuration
#"K": 1s^(2) 2s^(2) 2p^(6) 3s^(2) 3p^(6) 4s^(1)#
As you can see, the 2p and 3p sublevels each hold six electrons, which means that they are completely occupied. Since every p sublevel has a total of three p-orbitals - #p_x#, #p_y#, and #p_z# - the number of p-orbitals occupied in a #"K"# atom is equal to 6 - 3 p-orbitals on the 2p sublevel and 3 p-orbitals on the 3p sublevel.
A faster way to figuring out how many p-orbitals are occupied in a #"K"# atom is by looking at the periodic table. The periodic table is split into blocks, as you can see here
So, all you have to do is read the periodic table from left to right across each period - much like you would a sentence - until you get to potassium.
If you do this, you'll notice that you've passed two p sublevels: the one that starts at #"B"# and ends at #"Ne"# - the 2p sublevel - and the one that starts at #"Al"# and ends at #"Ar"# - the 3p sublevel. Once again, the conclusion is that #"K"# has 6 p-orbitals which hold 12 of its 19 electrons.