There is no hard and fast limit on how often they can refile if the case was not adjudicated "on the merits" (that is, as to whether you were guilty or not) but rather has been dismissed on purely procedural or technical grounds, or due to unavailability of witnesses or an attorney's (e.g. the prosecutor's) illness or personal emergency. At some point, it may be viewed as abusive and a court may order them (if a motion is brought) to either finally try the case or give up.