How many friday the 13th in a year? Your challenge is to write a program which, given a year, outputs the number of "Friday 13ths" in it.

Rules &amp; Details:


You can take input via STDIN, or as an argument passed to your program.
You should output the result to STDOUT.
You may assume that input will be a valid year, and does not pre-date the Gregorian calendar (undefined behaviour is permitted in these cases).
Calendar/Date libraries are allowed.


This is a code-golf, so the shortest code (in bytes) wins.

(Related challenge link)
Mathematica 49 46 45 44 42
As a pure function: 42 chars
DayName@{#,m,6}~Table~{m,12}~Count~Friday&amp;

Example
DayName@{#,m,6}~Table~{m,12}~Count~Friday&amp;[2013]


2


As a named function: 44 chars
f=DayName@{#,m,6}~Table~{m,12}~Count~Friday&amp;

Examples
f[1776]
f[2012]
f[2013]
f[2014]


2
3
2
1