If you need just the total rowcount of your dataextension, you can utilize DataExtensionRowCount()
In which case you just:
set @neededNumber = DataExtensionRowCount('TableName')
This is optimal as Lookups cap out at around 2500 and are much heavier with processing creating longer and unnecessary time sucks. This is because the lookups will pull all the data associated with the records, not just count them.
if you want your above ampscript to work, I would try the following:
set @neededNumber = RowCount(LookupRows("TableName","TickBox","true"))
(adding in spaces appropriately)
If this still returns error or 0 records, try below:
set @neededNumber = RowCount(LookupRows("TableName","TickBox",true))
by removing the quotes around the value in the lookup, you set it to boolean not string, which should help make the return more accurate if the field type of "TickBox" is boolean.