For measuring expression:
(i) at the gene level, i.e. ignoring splice isoforms
Raw counts represent "exact" counts, i.e. integer values. A raw count represents one mRNA fragment that was sequenced as one read. Counting these is very easy for unique regions, but becomes difficult when a read originating from an mRNA fragment can be mapped to several positions in the genome (i.e. these are known as multi-mapping reads; think e.g. of tandem repeat genes). You can only assign one count as the read comes from a single mRNA fragment, but to which gene? Earlier tools simply discarded these reads (truth being told, these multi-mapping reads affect very few loci in model organisms such as the fruitfly), but this is non-optimal, especially if you consider complex multi-ploid genomes or simply plants, which have had a lot of whole genome duplications (some very recent). To address this problem, methods were develop to statistically assign the reads to their most likely gene of origin; as for example RSEM which uses an expectation-maximisation approach to the problem. With such tools, you do not obtain raw integer counts anymore, but estimates of abundance; i.e. non-integer values associated with a value representing the probability that the estimate is correct.
(ii) at the transcript levels
the problem is the same, but possibly even more complex as genes have several isoforms that possibly share multiple exons. Counting transcript expression then relies on the same principles I've described above and also give you estimate of expression
(iii) using pseudo-aligment methods
You may have heard of Kallisto, Salmon? These are tools that are also providing estimate of expression, but do not rely on alignments. Instead they process all the kmers (string of a common length) derived from your sequencing reads and look them up in an index created from all your transcripts, finding the most likely transcript the reads originated from.