Moved testing functions around so we can re-use
Updated integer count