Replaced every occurrence of table.Count with #

table.Count is a garry function (as you can see because it starts with a capital letter). It was made to count the number of entries in a lookup table, which is, as I'm sure you know, is not necessary 99.99% of the time. Therefore, table.Count is O(n) (see http://en.wikipedia.org/wiki/Big_O_notation ). The `#` operator, which exists in vanilla Lua, is O(1), so it's like, a hundred times faster.

Rule of thumb, always look at the source code of any function that starts with a capital letter before using it. You can find the source in your garrysmod/lua folder.