How common is having ulcerative colitis for few years and then after surgery checking the colon u find out they have Crohn's disease instead?

Not uncommon. Both ulcerative colitis and crohns are an inflammatory disease process. They share several features and can be challenging to diagnose/treat. A specimen removed from the bowel and sent to a pathologist for an exam under microscope makes the diagnosis. In addition to uc/crohns the pathologic exam can find cancer and/or diverticulitis. Stay with your care team. Nicotine cessation will help.
Happens. But fortunately not too often. That's why it is so very important to do ones best to exclude crohn's before surgery.