I am using jQuery ajax function to handle data tracking from database. The returned data in this function is like

<root>
  <result city='LA' state='CA'></result>
  <result city='DALLAS' state='TX'></result>
  ...
 </root>

I'm using

 var count=$(data).find("result").length();

to get count of result nodes, but it is not right. So how to count result nodes using jQuery?

Edit
Report