Find cycles and count by dynamic programming

Without dynamic programming, count = Fibonacci(n) + Fibonacci(n - 2).