fixed count & fcount function