Merging directories and keep files that have more lines
Use More Quotes™.
Use a shebang line (disclosure: I wrote that answer).
Don't use single character variables. Maintainability is the most important feature of code.
Rather than echo cp1 etc., simply use cp -v to print every copy command verbatim.
You don't need to count the number of lines that diff returns, you can simply do if diff foo bar, or the safer option:

diff foo bar
exit_code=$?
if [ "$exit_code" -eq 0 ]
then
    [no difference]
elif [ "$exit_code" -eq 1 ]
then
    [difference]
else
    exit "$exit_code" # WTF
fi

Some people love mixing languages. I think cut -d' ' -f1 is much nicer than even a short awk script.
If you pass the file to wc on standard input, it doesn't print the filename, and so you don't need to process the output at all: wc -l &lt; /path
You can use if cp --no-clobber source destination to try copying the file instead of checking whether the target exists.
I'm not sure I understand why you're copying rather than moving files (unless this is a one-off script, which you're not going to test, and it's only going to take a few seconds anyway).
Be wary of using cd in scripts. It changes the context in a significant way, and makes it harder to reason about what the script will do. Instead, simply do `for path in "$directory"/*.
I can definitely recommend set -o errexit -o noclobber -o nounset -o pipefail. You could also use -o xtrace to make all those logging commands obsolete.
A common convention to get used to is to never end paths with a slash. Firstly because cp a b/ and cp a b and the same as long as b is a directory, and secondly because it makes it more natural to concatenate paths without ending up with double slashes.