To reach $n^{th}$ stair either we were on $(n-1)^{th}$ stair or $(n-2)^{th}$ stair.
Therefore it is following fibonacci series
To count number of ways to reach $n^{th} stair$, it should be sum of number of ways to reach $(n-1)^{th}$ stair and number of ways to reach $(n-2)^{th}$ stair.
$f(n) = f(n-1) + f(n-2)$