We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.