If it is a codeshare you will get miles according to the booking class the ticket maps into.
It'll show up as A3 8XX in your account, and thus should count as a segment towards status (if the flight gives non-zero miles).
Since A3's booking classes are very different from those used by the LH group, the mapping is not obvious.
As all A3 booking classes earn miles (with the usual exceptions), you should definitely get some
I think I've heard from people over at VFT doing this but I'm not 100% sure.