Convert count() result to integer