The scrap metal you give to Walter immediately disappears, as you cannot pickpocket scrap metal back from him, unlike in The Outcast Collection Agent. It is not even on his corpse.
If you have XP bonuses (from Well Rested and/or Swift Learner), you should note that the game rounds the bonus up. Thus, with a 10% XP bonus, you will receive 11 XP for all "pairs" of scrap metal (because (2 * 5) * 1.1 = 11), and 6 XP for an "odd" piece of scrap metal (5 * 1.1 = 6, since it rounds up).
Although Walter mentions that without the scrap metal the pipes will eventually burst again, the pipes will never again break after fixing them for the first time, even if you never give him any scrap metal.
If you want to sell more than 1000 pieces of scrap metal (added via console to recalibrate XP), Walter will take ONLY 1000 pieces of scrap metal from your inventory. Though, he will give you caps and XP for ALL pieces of scrap metal existing in inventory when you do the transaction.