Cause:
After a project-wide search-and-replace operation where not all selected text flows were modified, a message incorrectly reported that the number of selected text flows were modified.
Consequence:
Users were given misleading information about the number of changes made, particularly where "Search source" or "Search both" options were used.
Fix:
Change so that only text flows that have actually changed contribute to the reported number of modified text flows.
Result:
Users are now given accurate information about number of replacements made.

Description of problem:
In "project-wide search/replace", the replace count should be the number of strings replaced, not the number of search result.
This bug is easier to spot if search filter is set as either "Search Both" or "Search Source".
Version-Release number of selected component (if applicable):
Zanata version 1.6.1-SNAPSHOT (20120608-0019)
How reproducible:
Always
Steps to Reproduce:
1. Visit a document with few or no translation (such as Fedora Security Guide)
2. Press "copy from source" in row 1, then remove a term from the translation, save as approved. Suppose the term is "Security"
3. Click "Search and replace"
4. Set the search filter to "Search Both", then search "Security". Row 1 should be contained in the search results.
5. Assume it returns 1 results. Select all search results.
6. Use "Safety" as replace string and perform replace.
Actual results:
Message appears: Replaced "Security" with "Safety" in 1 text flows
Expected results:
Message appears: None of the targets have "Security".

Updating the message about replacements to show how many text flows had actual replacements, and how many were not changed by the replace operation, is technically straightforward.
Note about the replace count:
The number used at the moment is the number of text flows that are selected and have not yet had a replacement made since the last search, so is only equal to the number of results if all results are selected and no replacements have yet been made.
This could be improved by adding distinctive (e.g. green) highlighting to replaced parts of target strings, so that the 'already replaced' state is visible to the user, allowing users to see why replacements are not performed on these text flows even if they are selected.