OMG! We're Twinning!
MATL, 7 bytes
qZqd2=s

This solution exploits the fact that the prime gap (the difference between successsive prime numbers) is always &gt;= 2 (with the exception being the gap between 2 and 3). Because of this fact, all twin primes will be successive prime numbers. In this solution we just compute the differences between all primes less than the input n and count how many of these differences are equal to 2.
Try it Online
Explanation
    % Implicitly grab input, N
q   % Subtract one from the input (N-1)
Zq  % Get an array of all primes &lt;= (N-1)
d   % Compute successive differences (prime gaps)
2=  % Create a boolean array indicating which prime gaps are equal to 2
s   % Count the TRUE values in this array to determine the twin number
    % Implicitly display the result
    

If you instead want the not the number of pairs but the number of primes that are part of a pair, the following would work
qZqt!-|H=az

Try it Online