OMG! We're Twinning! Introduction

We define twin primes as two natural numbers p,p+2 which both are prime. 

Example: 5 and 7 are twin primes.

Let's define the twin number of some set of numbers as the number of twin prime numbers in that set

Example: {6,7,11,13,18,29,31} has a twin number 4, since there are four twin primes; 11,13 and 29,31.

Program

Input: A number n

Output: The twin number of the set of all natural numbers below n

Scoring

This is code-golf, so lowest bytes wins.
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