you can use
iTotalPages=(iRecordCount-(iRecordCount%iPageSize))/iPageSize+1
to get the pages
if you'd like to define pages as the page with full pagesize you can ommit +1 as
iTotalPages=(iRecordCount-(iRecordCount%iPageSize))/iPageSize

However, look at the order of operations
Step 1. iRecordCount / iPageSize (both are ints so the answer will be an int - a rounded off int).
Step 2. Convert the integer answer from Step 1 to a decimal
Step 3. Assign the new decimal answer to dPageRecords.

It doesn't matter how big or small iRecordCount or iPageSize become - if you want to eventually hold a decimal, you'll have to explicitly cast to some floating type or use decimals to begin with.

The following will work since the casts happen before the division which results in the same datatype as the dividend and divisor:
decimal dPageRecords = Convert.ToDecimal( (decimal)iRecordCount / (decimal)iPageSize);

Or you could just use decimals to begin with - the trade-off of a decimal datatype vs. the speed of explicitly casting an Int32 is about the same.