link_to_function variable increment

My view looks like this
  <%=link_to_function("add another", nil, :id => "more_link") do |
    page.insert_html :bottom, 'phone_numbers', add_phone_field(count
add_phone_field is a helper method.I need to increment count on every
click.But my code above does not do that.
Once count gets the value 1 it remains one.
How can I increase the value of count on every click.

My helper method :
  def add_phone_field(num)
      html=%{<div id="phone#{num}">
<label for="contact_phones_phone_number">Phone number</label>
      html<< (fields_for :contact_phones do |ff|
          ff.text_field :phone_number,:index=>num
        end )
      html<<link_to_function("delete", "$('phone#{num}').remove()")

Classic problem, please see and this

Essentially, what you need to do is, use :child_index => 'NEW_RECORD'
and on click replace NEW_RECORD by some unique number (time will be
most appropriate) using javascript.