Whats the difference between the usage of 个, 只, 张, and 条? I know that 个 is used for counting fruits and 只 is for counting animals but what should each counting word be applied?
Roughly speaking, the "role" of the quantifiers such as "個" or "張" in Chinese resembles that of the prepositions in English. Therefore, like learning prepositions in English requires one to naturalize oneself to all the variants, to properly manipulating Chinese quantifiers requires no more than developing a "feeling", possibly by listening and speaking with careful observation.
In general, "個" can be regarded as a generic quantifier, which means that you need not worry about that saying "個" will lead to any confusion. Saying "個" would just sound unnatural to a native ear. Thus, if you are unsure of which quantifier is a correct one, then you may just happily use "個".
We use "隻" in a context such as "一隻牛 (a cow)" or "一隻狗 (a dog)". And yes, "隻" is usually followed by the name of a certain sort of animals.
We use "張" in a context such as "一張紙 (a piece of paper)" or "一張餅 (a pancake)". This quantifier is for most of the time followed by the name of a thin object.
We use "條" in a context such as "一條定理 (a theorem)" or "一條蟲 (a worm)". It is usually reserved for describing an object of a thin, long form.