Should probably free the result before returning the count. Not sure it really matters at this point though since klutz is not actively developed and probably completely broken in H5.