Question: after some simplification, we get (2004y)/(y-2004)=x 
and by looking at the prime factorization of 2004 we observe there are only 12 ways in which 2004 can be expressed as the product of two integers.
which gives us 12 ordered pairs.But the answer is 45. how?(sorry for not using mathjax my browser does not support it)

Answer: 
Guide:

Once we get $$2004y+2004x=xy$$
$$-2004y-2004x+xy=0$$
$$2004^2-2004y-2004x+xy=2004^2$$
$$(2004-x)(2004-y)=2004^2=2^4\cdot 3^2\cdot 167^2$$

Can you complete the task?
1/x +1/y=2004

y+x/xy = 1/2004

2004(x+y)=xy

0=xy-2004x-2004y

0=(x-2004)(y-2004)-(2004)^2

(2004)^2=(x-2004)(y-2004)

It should be pretty easy from here. Just find the factors of 2004 squared.