How To Get My Kitten To Poop?

my kitten (2 yrs old) has been pooping once every 2-3 weeks since he was 1 yr old, i thought it might be constipation, but recently i noticed that both of his hind legs are swollen and painful. they hurt to touch or move. the last time he pooped was 4 days ago (today). today is day 5 without any bowel movement; what should i do? does this mean something bad happened to him?

How can I get my cat to stop peeing in the house?