I've connected same fan to motherboard, and used it's bios settings to change speeds from min to max and based on that, updated the code, and now it delivers results consistent with motherboard readings.

cnt=60000/cnt*50.