Let $f$ be a function defined on positive integers such that $f(1)=4$, $f(2n)=f(n)$ and $f(2n+1)=f(n)+2$ for every positive integer $n$. For how many positive integers $k$ less than $2014$, it is $f(k)=8$? 

$ 
\textbf{(A)}\ 45
\qquad\textbf{(B)}\ 120
\qquad\textbf{(C)}\ 165
\qquad\textbf{(D)}\ 180
\qquad\textbf{(E)}\ 215
$
1. We start by analyzing the given function \( f \). The function is defined recursively with the following properties:
   - \( f(1) = 4 \)
   - \( f(2n) = f(n) \)
   - \( f(2n+1) = f(n) + 2 \)

2. To understand the behavior of \( f \), we can explore the values of \( f \) for small \( n \):
   - \( f(1) = 4 \)
   - \( f(2) = f(1) = 4 \)
   - \( f(3) = f(1) + 2 = 6 \)
   - \( f(4) = f(2) = 4 \)
   - \( f(5) = f(2) + 2 = 6 \)
   - \( f(6) = f(3) = 6 \)
   - \( f(7) = f(3) + 2 = 8 \)
   - \( f(8) = f(4) = 4 \)
   - \( f(9) = f(4) + 2 = 6 \)
   - \( f(10) = f(5) = 6 \)
   - \( f(11) = f(5) + 2 = 8 \)
   - \( f(12) = f(6) = 6 \)
   - \( f(13) = f(6) + 2 = 8 \)
   - \( f(14) = f(7) = 8 \)
   - \( f(15) = f(7) + 2 = 10 \)

3. From the above values, we observe that \( f(n) \) depends on the number of ones in the binary representation of \( n \). Specifically, if \( g(n) \) is the number of ones in the binary representation of \( n \), then:
   \[
   f(n) = 2 + 2g(n)
   \]

4. We need to find the number of positive integers \( k \) less than 2014 for which \( f(k) = 8 \). Setting \( f(k) = 8 \), we get:
   \[
   2 + 2g(k) = 8 \implies 2g(k) = 6 \implies g(k) = 3
   \]

5. Therefore, we need to count the number of integers \( k \) less than 2014 that have exactly 3 ones in their binary representation.

6. The binary representation of 2014 is \( 11111011110_2 \). This is an 11-bit number. We need to count the number of ways to place 3 ones in an 11-bit number.

7. The number of ways to choose 3 positions out of 11 for the ones is given by the binomial coefficient:
   \[
   \binom{11}{3} = \frac{11 \times 10 \times 9}{3 \times 2 \times 1} = 165
   \]

8. Therefore, there are 165 positive integers less than 2014 that have exactly 3 ones in their binary representation.

The final answer is \(\boxed{165}\)