Common causes of urinary frequency include conditions such as urinary tract infections, diabetes, increased fluid consumption, urinary
stones, prostate disorders,
kidney disorders that affect the function of concentrating urine properly, and diseases of the urinary bladder.
The most likely condition, based on your symptoms, appears to be prostatitis. It is an inflammation of the prostate gland which may be in response to infection or may be uninfective in origin.