It's difficult to say why your script behaves badly, since we don't know what the files that you are dealing with looks like.  All we know is that you are interested in lines that contain the string ID and that you'd like to get whatever is after a = on those lines.
 Your script contains two unused variables: count (a string containing a shell command) and pid (an empty variable). You also jump through quite a number of hoops to get to what's after =:
more "$line" | grep ID | awk -F '=' '{ print $2 }'
 The more command is a pager, meaning it's a utility for viewing files.  Instead of using that, you could let grep read the file directly:
grep ID "$line" | awk -F '=' '{ print $2 }'
 But this is just letting grep do something that awk can do by itself,
awk -F '=' '/ID/ { print $2 }' "$line"
 But we can do better than that.  Instead of saving all the pathnames to the $filename file, we can let find do all the work for us:
find /opt/Logs -type f -size +10k \
    -exec awk -F '=' '/ID/ { split($0, a, "="); print a[2]$2 }' {} + >pid.txt
 This will find all regular files in or below /opt/Logs with size larger than 10 KB.  For each such file, each line containing the stringwhat's after ID will be split on(the first) =, and the bit after on each line containing the string =ID will be printed.  The result of that will be saved to pid.txt.
Related:
 
                