the corners count yes. but no autoupgrade
when you put an unremoveable item next to a core (of the proper level) before upgrading the core and do it then it will be treated as the other upgrade sacrifices and removed. just use a no-sell item as core upgrade ressource.
another useful thing is that item producers next to a core drain the item they produce from the cores surge output. i prepared a reactor town building (core type; primary output is energy) will surround it with population producers so that the cores population output goes down and surge it then.
one has to remember to rearrange buildings before core upgrades tough

or accidentally loose something valuable