On my server odbc_num_rows() is returning a kind of weird 48bit integer (perhaps it's a 64bit with 16bit heading zeroes...).
I found out that i can obtain the correct value by masking the result with 0xffffffff
<?php
// your $result=odbc_exec(...)
$num_rows = odbc_num_rows($result) & 0xffffffff;
echo "this works for me: num rows=$num_rows\n";
?>